package com.ruoyi.project.internal.internal.controller;


import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.project.internal.internal.service.StatisticsService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
 * 统计分类Controller
 * 
 * @author ruoyi
 * @date 2024-04-29
 */
@Controller
@RequestMapping("/internal/statistics")
public class StatisticsController extends BaseController
{
    private String prefix = "internal/statistics";

    @Autowired
    private StatisticsService statisticsService;

    @RequiresPermissions("internal:statistics:view")
    @GetMapping()
    public String internal(ModelMap mmap)
    {
        StatisticsService statistics = (StatisticsService) statisticsService.selectMonthlyStats();
        mmap.put("statistics", statistics);
        return prefix + "/statistics";
    }
}

